package com.tencreat.service.pt;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tencreat.common.core.HttpResult;
import com.tencreat.common.core.domain.model.LoginUser;
import com.tencreat.common.core.domain.model.ReqIdParam;
import com.tencreat.common.core.domain.model.ReqIdsParam;
import com.tencreat.domain.account.vo.MallMyAutoPtVO;
import com.tencreat.domain.mall.vo.PtIntegralVO;
import com.tencreat.domain.pt.MallPt;
import com.tencreat.domain.mall.dto.OrderMallSubmitDTO;
import com.tencreat.domain.pt.vo.*;
import com.tencreat.domain.pt.dto.*;
import org.quartz.SchedulerException;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 活动详情Service接口
 *
 * @author tencreat
 * @date 2021-11-08
 */
public interface IMallPtService  extends IService<MallPt> {
    /**
     * 查询活动详情
     *
     * @param id 活动详情ID
     * @return 活动详情
     */
     MallPt selectMallPtById(ReqIdParam id);

    /**
     * 查询活动详情列表
     *
     * @param mallPt 活动详情
     * @return 活动详情集合
     */
     List<MallPt> selectMallPtList(MallPt mallPt);

    /**
     * 新增活动详情
     *
     * @param mallPt 活动详情
     * @return 结果
     */
     int insertMallPt(MallPt mallPt);

    /**
     * 修改活动详情
     *
     * @param mallPt 活动详情
     * @return 结果
     */
     int updateMallPt(MallPt mallPt);

    /**
     * 批量删除活动详情
     *
     * @param ids 需要删除的活动详情ID
     * @return 结果
     */
     int deleteMallPtByIds(ReqIdsParam ids);

    /**
     * 删除活动详情信息
     *
     * @param id 活动详情ID
     * @return 结果
     */
     int deleteMallPtById(ReqIdParam id);

    HttpResult<?> startNextEpisode(PtStartNextDTO vo, LoginUser loginCheck) throws SchedulerException;
//    HttpResult<?> startNextNewEpisode(PtAdminStartNextVO vo, LoginUser loginCheck) throws SchedulerException;

    int addPtNumber(String id, String count);

    HttpResult<?> signInPtCoupon(String uuid);

    Page<ResPtGoodsListAppVO> ptGoodList(Page<ResPtGoodsListAppVO> page, Integer zoneId, LoginUser loginCheck);

    ResPtGoodsDetailAppVO getDetailApp(Integer id, LoginUser loginCheck);

    Page<ResPtRecordAppVO> getPtRecord(Page<ResPtRecordAppVO> page, Integer zoneId, Integer activityStatus, Integer status, LoginUser loginCheck);

    HttpResult<?> lotteryAfterOperation(LotteryAfterDTO vo, LoginUser loginCheck);

    Page<ResPtCouponRecordAppVO> selectPtCouponRecord(Page<ResPtCouponRecordAppVO> page, LoginUser loginCheck);

    HttpResult<?> startAutoPT(OrderMallSubmitDTO param, LoginUser loginCheck);

    HttpResult<?> exchangeCashCoupon(LoginUser loginCheck);

    List<HaveCashCouponVO> getHaveCashCoupon(LoginUser loginCheck);

    ResBonusPoolAppVO getBonusPoolInfo();

    Page<EarningsVO> getMyEarnings(Page<EarningsVO> page, LoginUser loginCheck);

    Page<ResBonusPoolPCVO> getBonusPools(Page<ResBonusPoolPCVO> page);

    List<ResUserBonusPoolPCVO> getAllBonusUser(Integer id);

    Page<Map<String, Object>> getEarningsRecord(Page<Map<String, Object>> page, Integer uuid, String mobile, Integer type, Date time, Integer status);

    HttpResult<?> ptSvipTryOut(Long uuid);

    HttpResult<?> balanceOpenedSvip(OpenedSvipDTO dto, LoginUser loginCheck);

    HttpResult<List<MallMyAutoPtVO>> managementMyAutoPt(Long uuid);

    HttpResult<?> updateAutoPtStatus(ReqIdParam param,Long uuid);

    ResAdminPtInfoVo queryPtAdminInfo();

    List<ResPtPeriodsVo> queryPtPeriodsList(PtPeriodsDTO dto);

    HttpResult<?> updatePtTime(PtUpdateTimeDto dto);

    HttpResult<?> removePt(PtPeriodsDTO dto);

    IPage<ResAdminPtHistoryVo> queryPtHistoryList(PtHistoryListDTO dto);

    IPage<ResAdminPtHistoryInfoVo> queryPtHistoryInfoList(PtHistoryInfoDTO dto);

    List<ResQueryPtGroupVo> queryGroup(Long ptGoodsId);
}
